package com.keshihao.eduservice.feign;

import com.keshihao.commonutils.R;
import com.keshihao.eduservice.hystrix.VodHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author Mr.Ke
 * @create 2020-06-13-22:31
 */
@Component
@FeignClient(name = "service-vod",fallback = VodHystrix.class)
public interface VodClient {

    // 定义调用的方法路径
    // 根据视频id删除阿里云视频
    @DeleteMapping("/eduvod/video/removeAlyVideo/{id}")
    public R removeAlyVideo(@PathVariable("id") String id);

    // 删除多个阿里云中的视频
    @DeleteMapping("/eduvod/video/removeAlyVideos")
    public R removeAlyVideos(@RequestParam("videoIdList") List<String> videoIdList);

}
